/*
 *      datastruct.h
 *      
 *      Copyright 2009 Daniele Ricci <denn86@gmail.com>, Luca Saccagi <luksak86@gmail.com>
 *      
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */

#ifndef _DATASTRUCT
#define _DATASTRUCT

#include "idmp.h"

#define WHERE_T ';'		/* End of query character definition */


void setSon(processingTree *father);
void setBro(processingTree *prevbro);
int pTree_newnode(processingTree *this, char *where, int index,int type);
int perfOP(processingTree *this);
void freeTree(processingTree *root);
iIp *HeadIns(IndexIp *top,iIp *cur,char type);
iIp *BottomIns(IndexIp *top,iIp *cur,char type);
iIp *BetweenIns(IndexIp *top,iIp *old,iIp *cur,char type);
dailyAlertList *newyList(yList *top,int year);
dailyAlertList *tsHeadIns(yList *top,dailyAlertList *cur);
dailyAlertList *tsBottomIns(yList *top,dailyAlertList *cur);
dailyAlertList *tsBetweenIns(yList *top,dailyAlertList *old,dailyAlertList *cur);
xmlNodeList *newxmlNodeList(void);
posList *newposList(void);
AlertList *AlertList_headInsert(AlertList *l,xmlNode *item);
stringList *stringList_headInsert(stringList *sel,char *selStr);

xmlNodeList *freexmlNodeList(xmlNodeList *list_to_delete);
void freestringList(stringList *list_to_delete);

#endif

